<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>西半屯中学 - 七年级新生报名系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f0f8ff;
            color: #333;
            line-height: 1.6;
            background-image: linear-gradient(120deg, #e0f7fa 0%, #f0f8ff 100%);
        }
        
        .container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px;
        }
        
        header {
            background: linear-gradient(135deg, #1e88e5 0%, #0d47a1 100%);
            color: white;
            padding: 25px 0;
            text-align: center;
            border-radius: 0 0 20px 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
        }
        
        .logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 10px;
        }
        
        .logo i {
            font-size: 2.8rem;
            color: #ffeb3b;
        }
        
        h1 {
            font-size: 2.2rem;
            margin-bottom: 10px;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
        }
        
        .subtitle {
            font-size: 1.1rem;
            opacity: 0.9;
            max-width: 700px;
            margin: 0 auto;
        }
        
        .progress-bar {
            display: flex;
            justify-content: space-between;
            max-width: 700px;
            margin: 30px auto;
            position: relative;
        }
        
        .progress-bar::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 4px;
            background-color: #e0e0e0;
            transform: translateY(-50%);
            z-index: 0;
        }
        
        .progress-step {
            width: 40px;
            height: 40px;
            background-color: #e0e0e0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #757575;
            font-weight: bold;
            position: relative;
            z-index: 1;
            transition: all 0.3s ease;
        }
        
        .progress-step.active {
            background-color: #1e88e5;
            color: white;
            transform: scale(1.1);
        }
        
        .form-container {
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
            padding: 30px;
            margin-bottom: 30px;
        }
        
        .form-section {
            display: none;
        }
        
        .form-section.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        h2 {
            color: #0d47a1;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #e3f2fd;
            font-size: 1.8rem;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #1565c0;
        }
        
        .required::after {
            content: " *";
            color: #e53935;
        }
        
        input, select, textarea {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #bbdefb;
            border-radius: 8px;
            font-size: 1rem;
            transition: border-color 0.3s;
        }
        
        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: #1e88e5;
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
        }
        
        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .form-col {
            flex: 1;
        }
        
        .upload-area {
            border: 3px dashed #90caf9;
            border-radius: 10px;
            padding: 30px;
            text-align: center;
            background-color: #e3f2fd;
            transition: all 0.3s;
            margin-bottom: 20px;
            cursor: pointer;
        }
        
        .upload-area:hover {
            background-color: #bbdefb;
            border-color: #42a5f5;
        }
        
        .upload-icon {
            font-size: 3rem;
            color: #42a5f5;
            margin-bottom: 15px;
        }
        
        .upload-text {
            color: #1565c0;
            margin-bottom: 15px;
            font-weight: 500;
        }
        
        .upload-hint {
            color: #757575;
            font-size: 0.9rem;
        }
        
        .document-list {
            background-color: #e8f4fd;
            border-radius: 10px;
            padding: 20px;
            margin-top: 20px;
        }
        
        .document-list h3 {
            color: #1565c0;
            margin-bottom: 15px;
        }
        
        .document-list ul {
            padding-left: 20px;
        }
        
        .document-list li {
            margin-bottom: 10px;
            color: #424242;
        }
        
        .btn-container {
            display: flex;
            justify-content: space-between;
            margin-top: 30px;
        }
        
        .btn {
            padding: 12px 30px;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .btn-prev {
            background-color: #e0e0e0;
            color: #424242;
        }
        
        .btn-prev:hover {
            background-color: #bdbdbd;
        }
        
        .btn-next {
            background: linear-gradient(135deg, #1e88e5 0%, #0d47a1 100%);
            color: white;
        }
        
        .btn-next:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
        }
        
        .btn-submit {
            background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
            color: white;
            width: 100%;
            padding: 15px;
            font-size: 1.1rem;
        }
        
        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(56, 142, 60, 0.4);
        }
        
        .summary-card {
            background-color: #e3f2fd;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }
        
        .summary-item {
            display: flex;
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid #bbdefb;
        }
        
        .summary-label {
            font-weight: 600;
            color: #1565c0;
            min-width: 150px;
        }
        
        .summary-value {
            flex: 1;
            color: #424242;
        }
        
        .confirmation {
            text-align: center;
            padding: 40px 20px;
        }
        
        .confirmation i {
            font-size: 5rem;
            color: #43a047;
            margin-bottom: 20px;
        }
        
        .confirmation h2 {
            color: #2e7d32;
            border: none;
            font-size: 2.2rem;
            margin-bottom: 15px;
        }
        
        footer {
            text-align: center;
            padding: 20px;
            color: #616161;
            font-size: 0.9rem;
            border-top: 1px solid #e0e0e0;
            margin-top: 30px;
        }
        
        @media (max-width: 768px) {
            .form-row {
                flex-direction: column;
                gap: 0;
            }
            
            .progress-step {
                width: 30px;
                height: 30px;
                font-size: 0.9rem;
            }
            
            h1 {
                font-size: 1.8rem;
            }
        }
    </style>
</head>
<body>
    <header>
        <div class="container">
            <div class="logo">
                <i class="fas fa-school"></i>
                <div>
                    <h1>西半屯中学七年级新生报名系统</h1>
                    <p class="subtitle">西半屯中学招生管理平台 - 让教育更公平，让成长更阳光</p>
                </div>
            </div>
        </div>
    </header>
    
    <div class="container">
        <div class="progress-bar">
            <div class="progress-step active">1</div>
            <div class="progress-step">2</div>
            <div class="progress-step">3</div>
            <div class="progress-step">4</div>
        </div>
        
        <div class="form-container">
            <!-- 第1步：学生基本信息 -->
            <div class="form-section active" id="step1">
                <h2><i class="fas fa-user-graduate"></i> 学生基本信息</h2>
                
                <div class="form-row">
                    <div class="form-col">
                        <div class="form-group">
                            <label for="studentName" class="required">学生姓名</label>
                            <input type="text" id="studentName" placeholder="请输入学生姓名">
                        </div>
                    </div>
                    <div class="form-col">
                        <div class="form-group">
                            <label for="gender" class="required">性别</label>
                            <select id="gender">
                                <option value="">请选择性别</option>
                                <option value="男">男</option>
                                <option value="女">女</option>
                            </select>
                        </div>
                    </div>
                </div>
                
                <div class="form-row">
                    <div class="form-col">
                        <div class="form-group">
                            <label for="birthDate" class="required">出生日期</label>
                            <input type="date" id="birthDate">
                        </div>
                    </div>
                    <div class="form-col">
                        <div class="form-group">
                            <label for="idNumber" class="required">身份证号</label>
                            <input type="text" id="idNumber" placeholder="请输入学生身份证号码">
                        </div>
                    </div>
                </div>
                
                <div class="form-group">
                    <label for="address" class="required">家庭住址</label>
                    <input type="text" id="address" placeholder="请输入详细家庭住址（包括村组）">
                </div>
                
                <div class="form-row">
                    <div class="form-col">
                        <div class="form-group">
                            <label for="primarySchool" class="required">毕业小学</label>
                            <input type="text" id="primarySchool" placeholder="请输入毕业小学名称">
                        </div>
                    </div>
                    <div class="form-col">
                        <div class="form-group">
                            <label for="studentPhone">学生联系电话</label>
                            <input type="tel" id="studentPhone" placeholder="请输入学生联系电话（可选）">
                        </div>
                    </div>
                </div>
                
                <div class="btn-container">
                    <div></div> <!-- 空占位 -->
                    <button class="btn btn-next" onclick="showStep(2)">下一步 <i class="fas fa-arrow-right"></i></button>
                </div>
            </div>
            
            <!-- 第2步：监护人信息 -->
            <div class="form-section" id="step2">
                <h2><i class="fas fa-users"></i> 监护人信息</h2>
                
                <div class="form-row">
                    <div class="form-col">
                        <div class="form-group">
                            <label for="guardian1Name" class="required">监护人姓名</label>
                            <input type="text" id="guardian1Name" placeholder="请输入主要监护人姓名">
                        </div>
                    </div>
                    <div class="form-col">
                        <div class="form-group">
                            <label for="guardian1Relation" class="required">与学生关系</label>
                            <select id="guardian1Relation">
                                <option value="">请选择关系</option>
                                <option value="父亲">父亲</option>
                                <option value="母亲">母亲</option>
                                <option value="祖父">祖父</option>
                                <option value="祖母">祖母</option>
                                <option value="其他">其他</option>
                            </select>
                        </div>
                    </div>
                </div>
                
                <div class="form-row">
                    <div class="form-col">
                        <div class="form-group">
                            <label for="guardian1Phone" class="required">联系电话</label>
                            <input type="tel" id="guardian1Phone" placeholder="请输入监护人联系电话">
                        </div>
                    </div>
                    <div class="form-col">
                        <div class="form-group">
                            <label for="guardian1Job">职业</label>
                            <input type="text" id="guardian1Job" placeholder="请输入监护人职业（可选）">
                        </div>
                    </div>
                </div>
                
                <h3 style="margin-top: 30px; color: #0d47a1;">第二监护人信息（可选）</h3>
                
                <div class="form-row">
                    <div class="form-col">
                        <div class="form-group">
                            <label for="guardian2Name">监护人姓名</label>
                            <input type="text" id="guardian2Name" placeholder="请输入第二监护人姓名">
                        </div>
                    </div>
                    <div class="form-col">
                        <div class="form-group">
                            <label for="guardian2Relation">与学生关系</label>
                            <select id="guardian2Relation">
                                <option value="">请选择关系</option>
                                <option value="父亲">父亲</option>
                                <option value="母亲">母亲</option>
                                <option value="祖父">祖父</option>
                                <option value="祖母">祖母</option>
                                <option value="其他">其他</option>
                            </select>
                        </div>
                    </div>
                </div>
                
                <div class="form-group">
                    <label for="guardian2Phone">联系电话</label>
                    <input type="tel" id="guardian2Phone" placeholder="请输入第二监护人联系电话">
                </div>
                
                <div class="btn-container">
                    <button class="btn btn-prev" onclick="showStep(1)"><i class="fas fa-arrow-left"></i> 上一步</button>
                    <button class="btn btn-next" onclick="showStep(3)">下一步 <i class="fas fa-arrow-right"></i></button>
                </div>
            </div>
            
            <!-- 第3步：证明材料上传 -->
            <div class="form-section" id="step3">
                <h2><i class="fas fa-file-upload"></i> 证明材料上传</h2>
                
                <div class="document-list">
                    <h3><i class="fas fa-list-check"></i> 需上传材料清单</h3>
                    <ul>
                        <li>学生户口本（首页、户主页、学生本人页）</li>
                        <li>学生身份证（正反面）</li>
                        <li>监护人身份证（正反面）</li>
                        <li>小学毕业证书或学籍证明</li>
                        <li>疫苗接种证明</li>
                        <li>一寸免冠照片（白底）</li>
                        <li>其他相关证明材料（如贫困证明、残疾证明等）</li>
                    </ul>
                    <p style="margin-top: 15px; font-size: 0.9rem; color: #e53935;">
                        <i class="fas fa-exclamation-circle"></i> 请确保上传材料清晰可辨，格式为JPG、PNG或PDF，单个文件不超过5MB
                    </p>
                </div>
                
                <div class="form-group" style="margin-top: 30px;">
                    <label class="required">证明材料上传</label>
                    <div class="upload-area" onclick="document.getElementById('fileInput').click()">
                        <div class="upload-icon">
                            <i class="fas fa-cloud-upload-alt"></i>
                        </div>
                        <div class="upload-text">点击或拖拽文件到此处上传</div>
                        <div class="upload-hint">支持格式：JPG, PNG, PDF（最大5MB）</div>
                    </div>
                    <input type="file" id="fileInput" multiple style="display: none;">
                    
                    <div id="fileList" style="margin-top: 20px;">
                        <p>已上传文件：</p>
                        <ul id="uploadedFiles" style="list-style-type: none; padding: 10px; background-color: #f5f5f5; border-radius: 8px; margin-top: 10px;">
                            <li>尚未上传文件</li>
                        </ul>
                    </div>
                </div>
                
                <div class="form-group">
                    <label for="specialNotes">特殊情况说明</label>
                    <textarea id="specialNotes" rows="4" placeholder="如有特殊情况需要说明，请在此处填写（如单亲家庭、留守儿童、特殊疾病等）"></textarea>
                </div>
                
                <div class="btn-container">
                    <button class="btn btn-prev" onclick="showStep(2)"><i class="fas fa-arrow-left"></i> 上一步</button>
                    <button class="btn btn-next" onclick="showStep(4)">下一步 <i class="fas fa-arrow-right"></i></button>
                </div>
            </div>
            
            <!-- 第4步：信息确认 -->
            <div class="form-section" id="step4">
                <h2><i class="fas fa-check-circle"></i> 信息确认</h2>
                
                <div class="summary-card">
                    <h3><i class="fas fa-user-graduate"></i> 学生基本信息</h3>
                    <div class="summary-item">
                        <div class="summary-label">姓名：</div>
                        <div class="summary-value" id="summaryName">-</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">性别：</div>
                        <div class="summary-value" id="summaryGender">-</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">出生日期：</div>
                        <div class="summary-value" id="summaryBirth">-</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">身份证号：</div>
                        <div class="summary-value" id="summaryID">-</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">家庭住址：</div>
                        <div class="summary-value" id="summaryAddress">-</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">毕业小学：</div>
                        <div class="summary-value" id="summarySchool">-</div>
                    </div>
                </div>
                
                <div class="summary-card">
                    <h3><i class="fas fa-users"></i> 监护人信息</h3>
                    <div class="summary-item">
                        <div class="summary-label">监护人姓名：</div>
                        <div class="summary-value" id="summaryGuardian1">-</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">关系：</div>
                        <div class="summary-value" id="summaryRelation1">-</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">联系电话：</div>
                        <div class="summary-value" id="summaryPhone1">-</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">第二监护人：</div>
                        <div class="summary-value" id="summaryGuardian2">-</div>
                    </div>
                </div>
                
                <div class="summary-card">
                    <h3><i class="fas fa-file-alt"></i> 上传材料</h3>
                    <div class="summary-item">
                        <div class="summary-label">已上传文件：</div>
                        <div class="summary-value" id="summaryFiles">0 个文件</div>
                    </div>
                    <div class="summary-item">
                        <div class="summary-label">特殊说明：</div>
                        <div class="summary-value" id="summaryNotes">无</div>
                    </div>
                </div>
                
                <div class="form-group" style="margin-top: 20px;">
                    <label>
                        <input type="checkbox" id="agreeTerms" style="width: auto; margin-right: 10px;">
                        我确认以上信息真实有效，并同意学校收集和使用这些信息用于招生工作
                    </label>
                </div>
                
                <div class="btn-container">
                    <button class="btn btn-prev" onclick="showStep(3)"><i class="fas fa-arrow-left"></i> 上一步</button>
                    <button class="btn btn-submit" onclick="submitForm()"><i class="fas fa-paper-plane"></i> 提交报名申请</button>
                </div>
            </div>
            
            <!-- 提交成功页面 -->
            <div class="form-section" id="confirmation">
                <div class="confirmation">
                    <i class="fas fa-check-circle"></i>
                    <h2>报名成功！</h2>
                    <p style="font-size: 1.2rem; margin-bottom: 25px;">感谢您提交报名申请，我们已经收到您的信息</p>
                    <div style="background-color: #e8f5e9; padding: 20px; border-radius: 10px; max-width: 600px; margin: 0 auto;">
                        <p style="margin-bottom: 15px;"><strong>报名编号：</strong> <span id="applicationId">SUN20230628001</span></p>
                        <p>请保存好您的报名编号，这是您查询审核进度的重要凭证</p>
                        <p style="margin-top: 10px; font-size: 0.95rem;">学校招生办公室将在3个工作日内审核您的材料，请保持电话畅通</p>
                    </div>
                    <div style="margin-top: 30px;">
                        <button class="btn btn-submit" style="width: auto; padding: 10px 25px;" onclick="window.print()">
                            <i class="fas fa-print"></i> 打印报名信息
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <footer>
        <div class="container">
            <p>西半屯中学招生办公室 © 2025 | 地址：故城县西半屯镇西半屯中学 | 咨询电话：0318-5511690</p>
            <p>西半屯中学招生管理平台 - 让每个孩子都能享受优质教育</p>
        </div>
    </footer>
    
    <script>
        let currentStep = 1;
        let uploadedFiles = 0;
        
        function showStep(step) {
            // 隐藏当前步骤
            document.getElementById(`step${currentStep}`).classList.remove('active');
            document.querySelectorAll('.progress-step')[currentStep-1].classList.remove('active');
            
            // 显示新步骤
            currentStep = step;
            document.getElementById(`step${currentStep}`).classList.add('active');
            document.querySelectorAll('.progress-step')[currentStep-1].classList.add('active');
            
            // 如果是确认页面，填充汇总信息
            if (step === 4) {
                updateSummary();
            }
        }
        
        function updateSummary() {
            // 学生信息
            document.getElementById('summaryName').textContent = document.getElementById('studentName').value || '-';
            document.getElementById('summaryGender').textContent = document.getElementById('gender').value || '-';
            document.getElementById('summaryBirth').textContent = document.getElementById('birthDate').value || '-';
            document.getElementById('summaryID').textContent = document.getElementById('idNumber').value || '-';
            document.getElementById('summaryAddress').textContent = document.getElementById('address').value || '-';
            document.getElementById('summarySchool').textContent = document.getElementById('primarySchool').value || '-';
            
            // 监护人信息
            document.getElementById('summaryGuardian1').textContent = document.getElementById('guardian1Name').value || '-';
            document.getElementById('summaryRelation1').textContent = document.getElementById('guardian1Relation').value || '-';
            document.getElementById('summaryPhone1').textContent = document.getElementById('guardian1Phone').value || '-';
            document.getElementById('summaryGuardian2').textContent = document.getElementById('guardian2Name').value || '未提供';
            
            // 上传信息
            document.getElementById('summaryFiles').textContent = `${uploadedFiles} 个文件`;
            document.getElementById('summaryNotes').textContent = document.getElementById('specialNotes').value || '无';
        }
        
        function submitForm() {
            const agree = document.getElementById('agreeTerms').checked;
            if (!agree) {
                alert('请阅读并同意报名条款');
                return;
            }
            
            // 在实际应用中，这里应该有表单验证和AJAX提交
            
            // 显示成功页面
            document.getElementById('step4').classList.remove('active');
            document.getElementById('confirmation').classList.add('active');
            
            // 生成随机报名号
            const now = new Date();
            const appId = `SUN${now.getFullYear()}${(now.getMonth()+1).toString().padStart(2,'0')}${now.getDate().toString().padStart(2,'0')}${Math.floor(Math.random()*900)+100}`;
            document.getElementById('applicationId').textContent = appId;
        }
        
        // 文件上传处理
        document.getElementById('fileInput').addEventListener('change', function(e) {
            const files = e.target.files;
            if (files.length > 0) {
                uploadedFiles = files.length;
                const fileList = document.getElementById('uploadedFiles');
                fileList.innerHTML = '';
                
                for (let i = 0; i < files.length; i++) {
                    const li = document.createElement('li');
                    li.innerHTML = `<i class="fas fa-file-pdf" style="color: #e53935; margin-right: 8px;"></i> ${files[i].name} (${formatFileSize(files[i].size)})`;
                    fileList.appendChild(li);
                }
            }
        });
        
        function formatFileSize(bytes) {
            if (bytes === 0) return '0 Bytes';
            const k = 1024;
            const sizes = ['Bytes', 'KB', 'MB', 'GB'];
            const i = Math.floor(Math.log(bytes) / Math.log(k));
            return parseFloat((bytes / Math.pow(k, i)).toFixed(2) + ' ' + sizes[i];
        }
        
        // 初始化日期输入为今天
        document.getElementById('birthDate').valueAsDate = new Date();
    </script>
</body>
</html>